#include "variable.hh"

variable::variable(const std::string& name_,
		   type t_,
		   const bound& bnd)
  : 
  name(name_),
  t(t_),
  bound_(bnd)
{};

bool variable::operator!=(const variable& v) const
{
  return !(*this == v);
}

bool variable::operator==(const variable& v) const
{
  return name.compare(v.name) == 0;
}

bool variable::operator==(const std::string& v) const
{
  return name.compare(v) == 0;
}

std::string variable::get_name() const
{
  return name;
}

bound
variable::get_bound () const
{
  return bound_;
}


std::ostream& operator << (std::ostream& stream, const variable& w)
{
  stream << w.name;

  return stream;
}
